package com.lhy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author：罗昊宇
 * @Package：com.lhy.entity
 * @Project：springboot03
 * @name：Emp
 * @Date：2024/3/11 0011  18:35
 * @Filename：Emp
 */
public class Emp {
    private Integer id;
    private String username;
    private String password;
    private String name;
    private Integer gender;
    private String image;
    private Integer job;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date entrydate;
    private Integer deptId;
    @JsonFormat(pattern = "yyyy年MM月dd日",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;
    @JsonFormat(pattern = "yyyy年MM月dd日",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;
    private int deptName;

    public int getDeptName() {
        return deptName;
    }

    public void setDeptName(int deptName) {
        this.deptName = deptName;
    }

    //多对一 在一的一方添加
    private Dept dept;


    public Emp() {
    }

    public Emp(Integer id, String username, String password, String name, Integer gender, String image, Integer job, Date entrydate, Integer deptId, Date createTime, Date updateTime, Dept dept) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.name = name;
        this.gender = gender;
        this.image = image;
        this.job = job;
        this.entrydate = entrydate;
        this.deptId = deptId;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.dept = dept;
    }

    /**
     * 获取
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取
     * @return username
     */
    public String getUsername() {
        return username;
    }

    /**
     * 设置
     * @param username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 获取
     * @return password
     */
    public String getPassword() {
        return password;
    }

    /**
     * 设置
     * @param password
     */
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return gender
     */
    public Integer getGender() {
        return gender;
    }

    /**
     * 设置
     * @param gender
     */
    public void setGender(Integer gender) {
        this.gender = gender;
    }

    /**
     * 获取
     * @return image
     */
    public String getImage() {
        return image;
    }

    /**
     * 设置
     * @param image
     */
    public void setImage(String image) {
        this.image = image;
    }

    /**
     * 获取
     * @return job
     */
    public Integer getJob() {
        return job;
    }

    /**
     * 设置
     * @param job
     */
    public void setJob(Integer job) {
        this.job = job;
    }

    /**
     * 获取
     * @return entrydate
     */
    public Date getEntrydate() {
        return entrydate;
    }

    /**
     * 设置
     * @param entrydate
     */
    public void setEntrydate(Date entrydate) {
        this.entrydate = entrydate;
    }

    /**
     * 获取
     * @return deptId
     */
    public Integer getDeptId() {
        return deptId;
    }

    /**
     * 设置
     * @param deptId
     */
    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    /**
     * 获取
     * @return createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取
     * @return updateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取
     * @return dept
     */
    public Dept getDept() {
        return dept;
    }

    /**
     * 设置
     * @param dept
     */
    public void setDept(Dept dept) {
        this.dept = dept;
    }

    public String toString() {
        return "Emp{id = " + id + ", username = " + username + ", password = " + password + ", name = " + name + ", gender = " + gender + ", image = " + image + ", job = " + job + ", entrydate = " + entrydate + ", deptId = " + deptId + ", createTime = " + createTime + ", updateTime = " + updateTime + ", dept = " + dept + "}";
    }
}
